package com.zthz.douxing

import java.nio.charset.Charset

class StringRedisSerializerService {

    Charset charset = Charset.forName("UTF-8")


    def String deserialize(byte[] bytes) {
        return (bytes == null ? null : new String(bytes, charset));
    }

    def byte[] serialize(String string) {
        return (string == null ? null : string.getBytes(charset));
    }
}
